import api from '@/http/index'

class Api {
    /* 获取表格列表 */
    static getTablesList(data) {
        return new Promise((resolve, reject) => {
            api.get('/api/PurchaseOrders/GetGridJson', data).then((res) => {
                resolve(res);
            }).catch(err => {
                reject(err)
            })
        });
    }
    /* 根据id获取详细信息 */
    static getItemInfo(data) {
        return new Promise((resolve, reject) => {
            api.get('/api/PurchaseOrders/GetForm', data).then((res) => {
                resolve(res);
            }).catch(err => {
                reject(err)
            })
        });
    }
    /* 收货确认和临时保存 */
    static setItemType(data) {
        return new Promise((resolve, reject) => {
            api.post('/api/PurchaseOrders/Receipt', data).then((res) => {
                resolve(res);
            }).catch(err => {
                reject(err)
            })
        });
    }

}

export default Api

